/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.rs.manager.impl;

import java.util.Collection;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xy.biz.rs.domain.bo.ManufactureRecordBO;
import com.xy.biz.rs.domain.query.ManufactureRecordQuery;
import com.xy.biz.rs.domain.converter.ManufactureRecordConverter;
import com.xy.biz.rs.manager.ManufactureRecordManager;
import com.xy.biz.rs.dao.ManufactureRecordDao;

/**
 *
 *
 * @author wwj
 * @date 2021-4-16
 */
@Service
public class ManufactureRecordManagerImpl implements ManufactureRecordManager {

	@Autowired
	private ManufactureRecordDao manufactureRecordDao;

	@Override
	public int saveManufactureRecord(ManufactureRecordBO manufactureRecordBO) {
		return manufactureRecordDao.saveManufactureRecord(ManufactureRecordConverter.toPO(manufactureRecordBO));
	}

	@Override
	public int saveAllManufactureRecord(Collection<ManufactureRecordBO> collection) {
		return manufactureRecordDao.saveAllManufactureRecord(ManufactureRecordConverter.toPO(collection));
	}

	@Override
	public int updateManufactureRecord(ManufactureRecordBO manufactureRecordBO) {
		return manufactureRecordDao.updateManufactureRecord(ManufactureRecordConverter.toPO(manufactureRecordBO));
	}

	@Override
	public int deleteManufactureRecord(Long manufactureRecordId) {
		return manufactureRecordDao.deleteManufactureRecord(manufactureRecordId);
	}

	@Override
	public ManufactureRecordBO getManufactureRecord(Long manufactureRecordId) {
		return ManufactureRecordConverter.fromPO(manufactureRecordDao.getManufactureRecord(manufactureRecordId));
	}

	@Override
	public List<ManufactureRecordBO> listManufactureRecordById(Collection<Long> collection) {
		return ManufactureRecordConverter.fromPO(manufactureRecordDao.listManufactureRecordById(collection));
	}

	@Override
	public List<ManufactureRecordBO> listManufactureRecord(ManufactureRecordQuery query) {
		return ManufactureRecordConverter.fromPO(manufactureRecordDao.listManufactureRecord(query));
	}

	@Override
	public int countManufactureRecord(ManufactureRecordQuery query) {
		return manufactureRecordDao.countManufactureRecord(query);
	}

}
